package com.sisyphus.spinach.network.exceptions;

/**
 * 服务器响应错误，返回非正确状态码
 */
public class ServeResponseException extends Exception {

    /**
     * 服务器返回数据
     */
    private final Object data;

    /**
     * 服务器返回错误码
     */
    private final int errorCode;

    public ServeResponseException(String message, int errorCode, Object object) {
        super(message);
        this.data = object;
        this.errorCode = errorCode;
    }

    public Object getData() {
        return data;
    }

    public int getErrorCode() {
        return errorCode;
    }

}
